<#--
备注:
- 当前文件下存储oracle可以使用的代码
-->
    <insert id="insert">
<#if idType??>
    <#if idType == "ORACLE_SYS_GUID">
        <selectKey keyColumn="${pkEntity.columnName?upper_case}" resultType="int" keyProperty="${entityName?uncap_first}.${pkEntity.javaFiledName}" order="BEFORE">
            SELECT SYS_GUID() FROM DUAL
        </selectKey>
    </#if>
    <#if idType == "ORACLE_SEQUENCE">
        <#if sequenceName??>
        <selectKey keyColumn="${pkEntity.columnName?upper_case}" resultType="int" keyProperty="${entityName?uncap_first}.${pkEntity.javaFiledName}" order="BEFORE">
            SELECT ${sequenceName?upper_case}.NEXTVAL FROM DUAL
        </selectKey>
        </#if>
    </#if>
</#if>
        insert into ${tableInfo.tableName}
        (
<#list columnEntityList as columnTemp>
            ${columnTemp.columnName?upper_case}<#if columnTemp_has_next>,</#if>
</#list>
        )
        values
        (
<#list columnEntityList as columnTemp>
            <#noparse>#{</#noparse>${entityName?uncap_first}.${columnTemp.javaFiledName}, jdbcType=${columnTemp.jdbcType}<#noparse>}</#noparse><#if columnTemp_has_next>,</#if>
</#list>
        )
    </insert>

    <insert id="insertBatch">
        insert into ${tableInfo.tableName}
        (
        <#list columnEntityList as columnTemp>
            ${columnTemp.columnName?upper_case}<#if columnTemp_has_next>,</#if>
        </#list>
        )
        <foreach item="item" collection="${entityName?uncap_first}s" separator="union all" index="index">
            select
            <#list columnEntityList as columnTemp>
                <#noparse>#{</#noparse>item.${columnTemp.javaFiledName}, jdbcType=${columnTemp.jdbcType}<#noparse>}</#noparse><#if columnTemp_has_next>,</#if>
            </#list>
            from dual
        </foreach>
    </insert>